package com.tjetc.controller;

import com.tjetc.common.JsonResult;
import com.tjetc.dao.OrderMapper;
import com.tjetc.entity.Order;
import com.tjetc.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/message")
public class MessageController {
    @Autowired
    private OrderService orderService;
    @RequestMapping("/push")
    private JsonResult pushMessage(String orderId){

        WebSocketController.sendMessageToClient(orderId);
        System.out.println(orderId);
        return new JsonResult<>(0,"",orderId);
    }
}
